#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__author__ = "Administrator"
__name__="call_init_method"
__date__="2016/9/19"
__time__="9:57"
"""
'''
class storage(dict):
    def __setattr__(self, key, value):
        self[key] = value
    def __getattr__(self, key):
        return self[key]
    def __delattr__(self, key):
        del self[key]

    def __call__(self, key):
        return self[key]

s = storage()
s.name = "hello"    # 这是__setattr__起的作用
print s("name")     # 这是__call__起的作用
print s["name"]     # 这是dict行为
print s.name        # 这是__getattr__起的作用
'''

'''
del s.name      # 这是__delattr__起的作用
print s("name")
'''

import  threading

class f(object):
    def __init__(self):
        pass
    def __call__(self):
        print 'hello world'

f()()

t = threading.Thread(target=f())
t.start()